Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | 1x 1x | // Content types based on backend API requirements
export enum CategoryType {
VOD = 'VOD',
TV = 'TV',
EVENTOS = 'Eventos',
KIDS = 'Kids',
ANIME = 'Anime'
}
export enum ContentType {
VOD = 'vod',
TV = 'tv',
SERIES = 'series',
EVENTS = 'events',
KIDS = 'kids',
ANIME = 'anime'
}
export interface Category {
id: number;
name: string;
category_type: CategoryType;
tmdb_id?: number; // TMDB category/genre ID for metadata
created_at?: string;
}
export interface TvChannelCategoryAdmin {
id: number;
name: string;
created_at: string;
usage_count: number;
is_default: boolean;
}
export interface Content {
id: number;
title: string;
description?: string;
image_url?: string;
poster_url?: string;
backdrop_url?: string;
stream_url?: string;
video_url?: string;
file_path?: string;
content_type?: string; // Changed from 'type: ContentType' to match backend
category_id?: number;
tmdb_id?: number;
year?: number;
runtime?: number;
duration?: number; // Duration in seconds
rating?: number; // Content rating (e.g., 7.5/10)
genre?: string;
quality?: string; // Quality indicator (HD, 4K, etc.)
language?: string; // Primary language
subtitle_languages?: string; // Available subtitle languages (JSON array)
audio_languages?: string; // Available audio languages (JSON array)
channel_number?: number;
channel_category?: string;
is_live?: boolean;
active: boolean;
created_at: string;
// TV Channel specific fields
provider?: string;
country?: string;
format?: string;
drm_keys?: string;
// DRM configuration (Widevine/PlayReady)
drm_type?: 'clearkey' | 'widevine' | 'playready';
license_server_url?: string;
drm_headers?: Record<string, string>;
// EPG integration fields
epg_source_id?: number;
epg_channel_id?: string;
epg_offset_minutes?: number;
// LiveTV specific headers
origin?: string;
user_agent?: string;
referer?: string;
custom_headers?: string;
// Per-channel HTTP proxy (Live TV only). Format: http://user:pass@ip:port
proxy_url?: string;
// Per-channel DNS-over-HTTPS resolver
doh_url?: string;
}
export interface Series {
id: number;
title: string;
description?: string;
image_url?: string;
poster_url?: string;
backdrop_url?: string;
category_id?: number;
tmdb_id?: number;
year?: number;
total_seasons?: number;
active?: boolean;
created_at?: string;
seasons?: Season[];
}
export interface Season {
id: number;
series_id: number;
season_number: number;
total_episodes?: number;
title?: string;
description?: string;
poster_url?: string;
image_url?: string;
backdrop_url?: string;
tmdb_id?: number;
air_date?: string;
episodes?: Episode[];
created_at?: string;
}
export interface ContentListResponse {
content: Content[];
category?: Category;
total: number;
page: number;
limit: number;
has_more: boolean;
}
export interface DeliveryCategory {
id: number;
name: string;
category_type: string;
created_at: string;
}
export interface DeliveryContent {
id: number;
category: DeliveryCategory;
title: string;
description?: string;
image_url?: string;
backdrop_url?: string;
tmdb_id?: number;
year?: number;
created_at: string;
stream_url: string;
}
export interface DeliveryContentListResponse {
content: DeliveryContent[];
total: number;
page: number;
limit: number;
has_more: boolean;
}
export interface SubtitleTrackResponse {
id: number;
language: string;
label: string;
url: string;
}
export interface StreamResponse {
id: number;
category_id: number;
title: string;
description?: string | null;
image_url?: string | null;
stream_url: string;
subtitle_url?: string | null;
subtitles?: SubtitleTrackResponse[];
tmdb_id?: number | null;
year?: number | null;
channel_number?: number | null;
created_at: string;
drm_keys?: string | null;
drm_keys_exo?: string | null;
drm_type?: 'clearkey' | 'widevine' | 'playready' | null;
license_server_url?: string | null;
drm_headers?: Record<string, string> | null;
proxy_url?: string | null;
doh_url?: string | null;
user_agent?: string | null;
origin?: string | null;
referer?: string | null;
custom_headers?: string | null;
requires_auth?: boolean;
is_internal_stream?: boolean;
}
export interface Episode {
id?: number;
series_id?: number;
season_id?: number;
episode_number: number;
title: string;
description?: string;
stream_url?: string;
duration?: number; // Duration in seconds
runtime?: number; // Runtime in minutes (alias for duration)
tmdb_id?: number; // TMDB episode ID
image_url?: string;
poster_url?: string; // Alias for image_url
air_date?: string;
created_at?: string;
}
export interface SearchRequest {
q: string;
category?: string;
year?: number;
tmdb_id?: number;
page?: number;
limit?: number;
}
export interface SearchResponse {
content: DeliveryContent[];
total: number;
page: number;
limit: number;
has_more: boolean;
}
export interface PaginationInfo {
page: number;
limit: number;
total: number;
has_more: boolean;
total_pages: number;
}
// LiveTV specific interfaces
export interface CreateTvChannelRequest {
name: string;
description?: string;
logo_url?: string;
stream_url: string;
channel_number?: number;
is_live: boolean;
channel_category?: string;
provider?: string;
country?: string;
format?: string;
drm_keys?: string;
active?: boolean;
// LiveTV specific headers
origin?: string;
user_agent?: string;
referer?: string;
custom_headers?: string;
// Per-channel HTTP proxy (Live TV only)
proxy_url?: string;
// Per-channel DNS-over-HTTPS resolver
doh_url?: string;
}
export interface TvProviderRecord {
id: number;
name: string;
url: string;
ttl_minutes: number;
enabled: boolean;
last_fetched_at?: string | null;
next_refresh_at?: string | null;
last_status?: string | null;
created_at: string;
}
export interface ScanFolderIngestResult {
movies_created: number;
series_created: number;
episodes_created: number;
subtitles_added: number;
skipped: number;
replaced: number;
logs: string[];
}
export interface TmdbMetadataRefreshResult {
total_candidates: number;
updated: number;
skipped: number;
errors: string[];
logs: string[];
}
export interface UpdateTvChannelRequest {
name: string;
description?: string;
logo_url?: string;
stream_url: string;
channel_number?: number;
is_live: boolean;
channel_category?: string;
provider?: string;
country?: string;
format?: string;
drm_keys?: string;
active?: boolean;
// LiveTV specific headers
origin?: string;
user_agent?: string;
referer?: string;
custom_headers?: string;
// Per-channel HTTP proxy (Live TV only)
proxy_url?: string;
// Per-channel DNS-over-HTTPS resolver
doh_url?: string;
}
export interface TvChannelFormData {
name: string;
description: string;
logo_url: string;
stream_url: string;
channel_number: number;
is_live: boolean;
provider: string;
country: string;
format: string;
drm_keys: string;
active: boolean;
// LiveTV specific headers
origin: string;
user_agent: string;
referer: string;
custom_headers: string;
// Per-channel HTTP proxy (Live TV only)
proxy_url?: string;
// Per-channel DNS-over-HTTPS resolver
doh_url?: string;
}
|